package cn.ffcs.uec.recordsApproval.action;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Components;

import cn.ffcs.raptornuke.plugin.common.zk.ctrl.BasePortletComposer;
import cn.ffcs.raptornuke.portal.theme.ThemeDisplay;
import cn.ffcs.uec.recordsApproval.action.bean.RecordsHistoricMainBean;
import cn.ffcs.uec.recordsApproval.constant.ApprovalConstants;
import cn.ffcs.uom.common.util.IPortletInfoProvider;
import cn.ffcs.uom.common.util.UomZkUtil;

/**
 * 员工档案审批流程历史查询
 * 
 * @author liuxiaodong
 *
 */
@Controller
@Scope("prototype")
public class RecordsHistoricMainComposer extends BasePortletComposer implements
		IPortletInfoProvider {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6719699657529812873L;

	private RecordsHistoricMainBean bean = new RecordsHistoricMainBean();

	@Override
	public String getPortletId() {
		return super.getPortletId();
	}

	@Override
	public ThemeDisplay getThemeDisplay() {
		return super.getThemeDisplay();
	}

	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);
		Components.wireVariables(comp, bean);
		UomZkUtil.autoFitHeight(comp);// 使用<borderlayout>时，需要加上这句进行初始化，不然从仓库调出的页面，不能显示

		this.bean.getRecordsHistoricListboxExt().addForward(
				ApprovalConstants.ON_SELECTED_TASK,
				this.bean.getRecordsHistoricFlowListBoxExt(),
				ApprovalConstants.ON_SELECTED_HISTORIC_RESPONSE);

	}

	/**
	 * 界面初始化
	 */
	public void onCreate$recordsHistoricMainWin() {

	}
}
